

<template>
  <div>
    <ul class="mui-table-view">
      <li class="mui-table-view-cell" v-for="item in newsList" :key="item.time">{{item.title}}</li>
    </ul>
    <h1>s12112</h1>
  </div>
</template>

<script>
const API_PROXY = "https://bird.ioliu.cn/v1/?url=";
import { Toast, Indicator } from "mint-ui";
export default {
  data() {
    return {
      newsList: []
    };
  },
  created() {
    this.getNews();
  },
  methods: {
    getNews() {
      Indicator.open({ text: '加载中...',spinnerType: "fading-circle"});
      this.$http
        .get(API_PROXY + "http://api.dagoogle.cn/news/nlist")
        .then(resule => {
          if (resule.body.code == 200) {
            this.newsList = resule.body.data.list;
            Indicator.close();
          } else {
            Toast("请求加载失败....");
            Indicator.close();
          }
        });
      
    }
  }
};
</script>

<style>
</style>
